home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / shmget.man < prev    next >
Encoding:
Text File  |  1990-09-12  |  4.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. shmget                C Library Procedures                 shmget
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      shmget - get shared memory segment
  10.  
  11. SSYYNNTTAAXX
  12.      ##iinncclluuddee <<ssyyss//ttyyppeess..hh>>
  13.      ##iinncclluuddee <<ssyyss//iippcc..hh>>
  14.      ##iinncclluuddee <<ssyyss//sshhmm..hh>>
  15.  
  16.      iinntt sshhmmggeett ((kkeeyy,, ssiizzee,, sshhmmffllgg))
  17.      kkeeyy__tt kkeeyy;;
  18.      iinntt ssiizzee,, sshhmmffllgg;;
  19.  
  20. DDEESSCCRRIIPPTTIIOONN
  21.      The system call returns the shared memory identifier associ-
  22.      ated with _k_e_y.
  23.  
  24.      A shared memory identifier and associated data structure and
  25.      shared memory segment of size _s_i_z_e bytes are created for _k_e_y
  26.      if one of the following are true:
  27.  
  28.              The _k_e_y is equal to IPC_PRIVATE.  For further infor-
  29.              mation, see intro(2).
  30.  
  31.              The _k_e_y does not already have a shared memory iden-
  32.              tifier associated with it, and (_s_h_m_f_l_g & IPC_CREAT )
  33.              is "true".
  34.  
  35.      Upon creation, the data structure associated with the new
  36.      shared memory identifier is initialized as follows:
  37.  
  38.              The sshhmm__ppeerrmm..ccuuiidd,,shm_perm.uid,sshhmm__ppeerrmm..ccggiidd,, and
  39.              sshhmm__ppeerrmm..ggiidd are set equal to the effective user ID
  40.              and effective group ID, respectively, of the calling
  41.              process.
  42.  
  43.              The low-order 9 bits of sshhmm__ppeerrmm..mmooddee are set equal
  44.              to the low-order 9 bits of _s_h_m_f_l_g. The sshhmm__sseeggsszz is
  45.              set equal to the value of _s_i_z_e.
  46.  
  47.              The sshhmm__llppiidd,,shm_nattch,sshhmm__aattiimmee,, and sshhmm__ddttiimmee are
  48.              set equal to 0.  The sshhmm__ccttiimmee is set equal to the
  49.              current time.
  50.  
  51. RREETTUURRNN VVAALLUUEE
  52.      Upon successful completion, a non-negative integer, namely a
  53.      shared memory identifier is returned.  Otherwise, a value of
  54.      -1 is returned and _e_r_r_n_o is set to indicated the error.
  55.  
  56. DDIIAAGGNNOOSSTTIICCSS
  57.      The system call will fail if one or more of the following
  58.      are true:
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0                                                     1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. shmget                C Library Procedures                 shmget
  71.  
  72.  
  73.  
  74.      [EINVAL]       The _s_i_z_e is less than the system imposed
  75.                     minimum or greater than the system imposed
  76.                     maximum.
  77.  
  78.      [EACCES]       A shared memory identifier exists for _k_e_y but
  79.                     operations permission as specified by the
  80.                     low-order 9 bits of _s_h_m_f_l_g would not be
  81.                     granted. For further information, see
  82.  
  83.      [EINVAL]       A shared memory identifier exists for _k_e_y but
  84.                     the size of the segment associated with it is
  85.                     less than _s_i_z_e and _s_i_z_e is not equal to zero.
  86.  
  87.      [ENOENT]       A shared memory identifier does not exist for
  88.                     _k_e_y and (_s_h_m_f_l_g & IPC_CREAT ) is "false".
  89.  
  90.      [ENOSPC]       A shared memory identifier is to be created
  91.                     but the system imposed limit on the maximum
  92.                     number of allowed shared memory identifiers
  93.                     system wide would be exceeded.
  94.  
  95.      [ENOMEM]       A shared memory identifier and associate
  96.                     shared memory segment are to be created by
  97.                     the amount of available physical memory is
  98.                     not sufficient to fill the request.
  99.  
  100.      [EEXIST]       A shared memory identifier exists for _k_e_y but
  101.                     ((_s_h_m_f_l_g & IPC_CREAT ) & (_s_h_m_f_l_g & IPC_EXCL
  102.                     )) is "true".
  103.  
  104. SSEEEE AALLSSOO
  105.      shmctl(2), shmop(2), ftok(3)
  106.  
  107. BBUUGGSS
  108.      The System V shared memory functions are implemented at user
  109.      level on top of the mmap(2) interface.  Not all the System V
  110.      functionality is implemented.
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0                                                     2
  130.  
  131.  
  132.  
  133.